package com.xxxx.file.controller.admin;


import com.xxxx.server.dto.PageDto;
import com.xxxx.server.dto.ResponseDto;
import com.xxxx.server.service.FileService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/admin/file")
public class FileController {

    public static final String BUSINESS_NAME = "文件上传";

    @Resource
    private FileService fileService;

    @PostMapping("/list")
    public ResponseDto list(@RequestBody PageDto pageDto) {
        ResponseDto<PageDto> responseDto = new ResponseDto<>();

        fileService.list(pageDto);
        responseDto.setContent(pageDto);
        return responseDto;
    }
}
